package com.woniu.adminservice.dao;

import com.woniu.adminservice.entity.RolesMenus;
import com.woniu.adminservice.entity.UsersRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UsersRoleDao {
    UsersRole queryById(Integer id);

    List<UsersRole> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
    
    List<UsersRole> findAll();

    List<UsersRole> queryAll(UsersRole usersRole);

    int insert(UsersRole usersRole);

    int update(UsersRole usersRole);

    int deleteById(Integer id);

    @Select("select * from users_role where role_id = #{value}")
    List<RolesMenus> selectByRoleId(Integer id);
}